package com.atguigu.gulimall.product.feign;

import com.atguigu.common.to.SkuHasStockVo;
import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @ClassName WareFeignService
 * @Description TODO
 * @Author Administrator
 * @Date 2022/6/14 17:01
 * @Version 1.0
 **/
@FeignClient("gulimall-ware")
public interface WareFeignService {

    /**
     * R在设计时可以加上泛型
     * 2直接返回需要的类型
     * 3自己封装解析结果
     * @param skuIds
     * @return
     */
    @PostMapping("/ware/waresku/hasstock")
    public R getSkusHasStock(@RequestBody List<Long> skuIds);

}
